package com.sharemarking.wa.common;

import java.util.List;

/**
 * Page类 用于需要返回分页列表的接口
 * Created by king on 2018/06/12.
 */
public class Page<T> {

    private List<T> list;
    private int index;
    private int size;
    private int total;
    private boolean hasNext;

    public Page(){
        index = 0;
        size = 10;
    }
    
    public Page(List<T> list,int index,int size,int total,boolean hasNext){
    	this.list = list;
    	this.index = index;
    	this.size = size;
    	this.total = total;
    	this.hasNext = hasNext;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public boolean isHasNext() {
        return hasNext;
    }

    public void setHasNext(boolean hasNext) {
        this.hasNext = hasNext;
    }
}
